import http from './http/index';

export function apiGetDictDataAll(data?: any) {
  return http({
    method: 'GET',
    url: `/api/system/dictData/queryDetails`,
    params: data,
  });
}

export function apiGetDepartmentList(data?: any) {
  return http({
    method: 'POST',
    url: `/api/system/dept/cas/tree`,
    data: {
      name: '',
      ...data,
    },
  });
}

export function apiGetDictDataByType(data: any) {
  return http({
    method: 'GET',
    url: `/api/system/dictData/query/${data.dict_type}`,
  });
}

export function apiEditPw(data: any) {
  return http({
    method: 'POST',
    url: `/api/system/user/cas/editPassword`,
    data,
  });
}

export function apiAddUser(data: any) {
  return http({
    method: 'POST',
    url: `/api/system/user/cas/add`,
    data,
  });
}

export function apiUpdateUser(data: any) {
  return http({
    method: 'POST',
    url: `/api/system/user/cas/edit`,
    data,
  });
}

export function apiDetailUser(account: any) {
  return http({
    method: 'GET',
    url: `/api/system/user/cas/get/${account}`,
  });
}
